<!DOCTYPE html>
<html>
<head>
<title>Weiran ECMAScript Applications Framework</title>
<link rel=stylesheet type=text/css href=./style.css>
</head>

<body>

<div class=leftbar>
    <h1>Weiran</h1>
    <p>ECMAScript<br />Applications Framework</p>
    <p>Version: 1.2</p>
    <ul>
	<li><a href=Weiran.html>Weiran</a></li>
	<li>Weiran.Array<ul>
	    <li><a href=#Weiran.Array.isArray>Weiran.Array.isArray</a></li>
	    <li><a href=#Weiran.Array.indexOf>Weiran.Array.indexOf</a></li>
	    <li><a href=#Weiran.Array.removeItem>Weiran.Array.removeItem</a></li>
	    <li><a href=#Weiran.Array.filter>Weiran.Array.filter</a></li>
	</ul></li>
	<li><a href=Weiran.Buffer.html>Weiran.Buffer</a></li>
	<li><a href=Weiran.Class.html>Weiran.Class</a></li>
	<li><a href=Weiran.Date.html>Weiran.Date</a></li>
	<li><a href=Weiran.DB.html>Weiran.DB</a></li>
	<li><a href=Weiran.Event.html>Weiran.Event</a></li>
	<li><a href=Weiran.Events.html>Weiran.Events</a></li>
	<li><a href=Weiran.Function.html>Weiran.Function</a></li>
	<li><a href=Weiran.JSON.html>Weiran.JSON</a></li>
	<li><a href=Weiran.Lang.html>Weiran.Lang</a></li>
	<li><a href=Weiran.Number.html>Weiran.Number</a></li>
	<li><a href=Weiran.String.html>Weiran.String</a></li>
	<li><a href=Weiran.GRUB.html>GRUB Mechanism</a></li>
    </ul>
    <p>
        Copyright &copy; All<span>i</span>dylls<br />
        2011 - 2012
    </p>
</div>

<div class=content>

<div class=reftitle>Weiran.Array</div>
<p>Sub namespace contains convenience functions for array manipulation.</p>

<a name=Weiran.Array.isArray></a>
<h3><code>Weiran.Array.isArray(obj)</code></h3>
<p><b>Static method</b></p>
<p>
    <b>Parameters: </b><br />
    <span class=parameters>obj</span> - <code>object</code>
</p>
<p><b>Returns: </b><code>boolean</code></p>
<p>Returns true if an object is an array, false if it is not.</p>

<a name=Weiran.Array.indexOf></a>
<h3><code>Weiran.Array.indexOf(array, obj)</code></h3>
<p><b>Static method</b></p>
<p>
    <b>Parameters: </b><br />
    <span class=parameters>array</span> - <code>object</code><br />
    <span class=parameters>obj</span> - <code>object</code>
</p>
<p><b>Returns: </b><code>number</code></p>
<p>Returns the index at, which the first object was found in the array. If not found, returns -1.</p>

<a name=Weiran.Array.removeItem></a>
<h3><code>Weiran.Array.removeItem(array, item)</code></h3>
<p><b>Static method</b></p>
<p>
    <b>Parameters: </b><br />
    <span class=parameters>array</span> - <code>object</code><br />
    <span class=parameters>item</span> - <code>object</code>, the item will be removed
</p>
<p><b>Returns: </b><code>array</code></p>
<p>Remove an object from an array. Iterates through the array to find the item, then removes it. 
		    Returns a reference to the array.</p>

<a name=Weiran.Array.filter></a>
<h3><code>Weiran.Array.filter(array, callback, caller)</code></h3>
<p><b>Static method</b></p>
<p>
    <b>Parameters: </b><br />
    <span class=parameters>array</span> - <code>object</code><br />
    <span class=parameters>callback</span> - <code>function</code>, filter function<br />
    <span class=parameters>caller</span> - <code>object</code>, optional caller of callback function
</p>
<p><b>Returns: </b><code>array</code></p>
<p>Returns an array of elements from the passed in array for which the callback returns true.
		    Provides the functionality of the <code>Array.prototype.filter</code> extension to the ECMA-262 standard.
		    Where available, <code>Array.prototype.filter</code> will be used. Based on well known example from
		    <a target=_blank href=http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter>
		    http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter</a>.
		    The optional caller object to be set as this when the callback is called.</p>

</div>

</body>
</html>
